package com.young.springdemo.service.expression;

//行动节点
public class ActionNode extends AbstractExpression {
    private String action;

    public ActionNode(String action) {
        this.action = action;
    }

    @Override
    public String interrupt() {
        if (action.equalsIgnoreCase("move")){
            return "移动";
        }else if (action.equalsIgnoreCase("run")){
            return "快跑";
        }else {
            return "指令不符";
        }
    }
}
